﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace AccessWare
{
    public partial class Inventory : System.Web.UI.Page
    {
        DataSet ds = new DataSet();
        protected void Page_Load(object sender, EventArgs e)
        {
            string strSPNAme = "getreport";
            SPCalling objSPCalling = new SPCalling();
            ds = objSPCalling.ExecuteDataset(CommandType.StoredProcedure, strSPNAme);
            //gdReportList.DataSource = ds.Tables[0];
            //gdReportList.DataBind();
            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();
            //gdReportList.Visible = true;
        }
        protected void gvRequestSeatRelease_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType != DataControlRowType.Header)
            {
                if (e.Row.RowIndex >= 0)
                {
                    Label lblSNo = (Label)e.Row.FindControl("lblSNo");
                    LinkButton lnkDemandReqID = (LinkButton)e.Row.FindControl("lnkDemandReqID");
                    //ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "var w=window.open('popup.aspx?Redirected=1" + "','cal','width=900,height=700,top=50,left=100,scrollbars=1');", true);
                    lnkDemandReqID.Style.Add("cursor", "hand");
                    lnkDemandReqID.Attributes.Add("onclick", "ShowSeatDetails('" + lblSNo.Text + "');return false;");
                }
            }
        }
    }
}